//
//  NSString+DicJson.m
//  leapTeen
//
//  Created by Company on 17/6/27.
//  Copyright © 2017年 company. All rights reserved.
//

#import "NSString+DicJson.h"

@implementation NSString (DicJson)

+ (NSString *)trimWhiteSpaceAndNewLineWithStr:(id)params{
    
    NSData *jsondata = [NSJSONSerialization dataWithJSONObject:params options:NSJSONWritingPrettyPrinted error:nil];
    NSString *str = [[NSString alloc]initWithData:jsondata encoding:NSUTF8StringEncoding];
    NSString *content = [str stringByReplacingOccurrencesOfString:@"\n" withString:@""];
    NSString *newContent = [content stringByReplacingOccurrencesOfString:@" " withString:@""];
    return newContent;
}

@end
